#! /bin/sh

name=man-db
version=2.13.1
revision=1
tarball_url="https://download.savannah.nongnu.org/releases/man-db/man-db-${version}.tar.xz"
tarball_blake2b="f0f61bbd91992e2be8343459addca4bb9892ad4887756a1e58e8dccf71d30fd4bfd105739f1c730d7e73088825508566c9c29e74a59d78453055db25c7a929c6"
imagedeps="groff"
hostdeps="gcc pkg-config"
deps="core-libs bash gdbm groff less libpipeline zlib"

prepare() {
    autotools_recursive_regen
}

configure() {
    autotools_configure \
        --disable-setuid \
        --with-systemdtmpfilesdir= \
        --with-systemdsystemunitdir= \
        --with-pager=${prefix}/bin/less
}

build() {
    make -j${parallelism}
}

package() {
    DESTDIR="${dest_dir}" make install

    post_package_strip
}
